﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SIGCBI.Entities;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace SIGCBI.Repository.Mapping
{
    public class ServicioMap : EntityTypeConfiguration<SERVICIO>
    {
        public ServicioMap()
        { 
            //key
            this.HasKey(p => p.ID);

            //propiedades
            this.Property(p => p.ID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(p => p.Descripcion)
                .HasMaxLength(250)
                .IsRequired();


            //table
            this.ToTable("SERVICIO");

        }
    }
}
